<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <title>公信商城－订单管理</title>

    <!--图标字体 http://fontawesome.io/icons/ -->
    <link rel="stylesheet" href="css/font/css/font-awesome.min.css" />
    <link rel="stylesheet" href="css/ui-base.css"/>
    <link rel="stylesheet" href="css/main.css"/>
    <script src="js/jquery.min.js"></script>
    <!--<script src="js/loaderMask.js"></script>-->
</head>
<body>
    <header class="header">
        <span class="title">订单管理</span>
        <a class="l-btn l-back" href="myStore-index.html"></a>
        <!--<a class="r-btn r-home" href="index.html"></a>-->
        <a class="r-btn r-pcenter" href="personalCenter.html"></a>
    </header>
    <div class="content w100 ho">
        <div class="order-btn goods-btn ho">
            <ul>
                <li class="on"><a href="myStore-order-unpay.html">进行中</a></li>
                <li><a href="myStore-order-completed.html">已完成</a></li>
                <li><a href="myStore-order-closed.html">已关闭</a></li>
            </ul>
        </div>
        <div class="order-btn order-btn-02 ho">
            <ul>
                <li><a href="myStore-order-unpay.html">待付款</a></li>
                <li class="on"><a href="myStore-order-unshipping.html">待发货</a></li>
                <li><a href="myStore-order-shippinged.html">已发货</a></li>
                <li><a href="myStore-order-refunding.html">退款中</a></li>
            </ul>
        </div>
        <div class="order-content ho w100">
            <!--待发货-->
            <ul class="order-list w100 ho">
                <li>
                    <div class="line01">
                        <a class="nn f-l" href="store.html">聚合数码专营店&nbsp;<i class="fa fa-angle-double-right"></i></a>
                        <span class="cur-state f-r">待发货</span>
                    </div>
                    <div class="line02 ho">
                        <img src="images/mainpage/goods-img02.jpg" class="ll f-l">
                        <div class="f-l rr ho">
                            <p class="tt omission">手工制作楠木老漆龟甲勺手工制作楠木老漆龟甲勺</p>
                            <span class="ttt">￥38.8</span>
                            <span class="ttt">×1</span>
                        </div>
                    </div>
                    <div class="line03">
                        <span class="nn f-l">实付款：</span>
                        <span class="cur-state f-l">￥66.66</span>
                        <a class="btn btn01 f-r" id="ship" href="##">立即发货</a>
                        <a class="btn f-r" href="myStore-order-details.html">订单详情</a>
                    </div>
                </li>
                <li>
                    <div class="line01">
                        <a class="nn f-l" href="store.html">聚合数码专营店&nbsp;<i class="fa fa-angle-double-right"></i></a>
                        <span class="cur-state f-r">待发货</span>
                    </div>
                    <div class="line02 ho">
                        <img src="images/mainpage/goods-img02.jpg" class="ll f-l">
                        <div class="f-l rr ho">
                            <p class="tt omission">手工制作楠木老漆龟甲勺手工制作楠木老漆龟甲勺</p>
                            <span class="ttt">￥38.8</span>
                            <span class="ttt">×1</span>
                        </div>
                    </div>
                    <div class="line02 ho">
                        <img src="images/mainpage/goods-img02.jpg" class="ll f-l">
                        <div class="f-l rr ho">
                            <p class="tt omission">手工制作楠木老漆龟甲勺手工制作楠木老漆龟甲勺</p>
                            <span class="ttt">￥38.8</span>
                            <span class="ttt">×1</span>
                        </div>
                    </div>
                    <div class="line03">
                        <span class="nn f-l">实付款：</span>
                        <span class="cur-state f-l">￥66.66</span>
                        <a class="btn btn01 f-r" id="ship" href="##">立即发货</a>
                        <a class="btn f-r" href="myStore-order-details.html">订单详情</a>
                    </div>
                </li>
            </ul>
        </div>
    </div>

    <!--弹框组件-->
    <script src="js/sweetalert/sweetalert.min.js"></script>
    <link rel="stylesheet" type="text/css" href="js/sweetalert/sweetalert.css">
    <script>
        $(function () {
            /*按钮切换*/
            $('.order-btn li').on('click', function () {
                $(this).addClass('on').siblings().removeClass('on');
            });

            /*立即发货操作*/
            $('#ship').on('click', function () {
                swal({
                    title: "发货是否需要物流?",
//                    text: "是否需要物流",
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonColor: "#f85050",
                    confirmButtonText: "需要物流发货",
                    cancelButtonText: "不需要物流直接发货",
                    closeOnConfirm: false,
                    closeOnCancel: false
                },
                function(isConfirm){
                    if (isConfirm) {
                        swal({
                            title: "请填写快递信息",
                            text: "快递公司：<select name='kd-company' id='kuaidi'><option value='0'>请选择</option><option value='604'>顺风</option></select>",
                            type: "input",
                            html: true,
                            confirmButtonColor: "#f85050",
                            showCancelButton: true,
                            closeOnConfirm: false,
                            confirmButtonText: "发货",
                            cancelButtonText: "取消",
                            animation: "slide-from-top",
                            inputPlaceholder: "快递单号"
                        },
                        function(inputValue){
                            var text = $("#kuaidi").find("option:selected").text();
                            if (inputValue === false) {
                                return false;
                            }
                            if (inputValue === "" || text == "请选择") {
                                swal.showInputError("请完善快递信息!");
                                return false;
                            }

                            swal({
                                title: "已发货",
                                text: "快递公司：" + text + "；<br />快递单号是: " + inputValue,
                                type: "success",
                                html: true,
                                confirmButtonColor: "#f85050",
                                confirmButtonText: "确认"
                             });
                        });
                    } else {
                        swal({
                            title: "已发货",
                            type: "success",
                            confirmButtonText: "确认"
                        });
                    }
                });
            });
        });
    </script>
</body>
</html>